package com.zjlab.web.bean;

import lombok.Getter;

import java.util.Arrays;
import java.util.List;

/**
 * @author xue
 * @create 2022-11-08 10:44
 */
@Getter
public enum ModeEnum {

    /**
     * 首页
     */
    NONE(0, Arrays.asList("首页视频.mp4", "大屏示意图.jpg")),
    IP(1, Arrays.asList("分组视频1.mp4", "示意图1.jpg")),
    MAKE(2, Arrays.asList("分组视频2.mp4", "示意图2.jpg")),
    NDN(3, Arrays.asList("分组视频3.mp4", "示意图3.jpg")),
    MF(4, Arrays.asList("分组视频4.mp4", "示意图4.jpg")),
    GEO(5, Arrays.asList("分组视频5.mp4", "示意图5.jpg"));


    private final Integer modeId;
    private final List<String> fileName;

    ModeEnum(Integer modeId, List<String> fileName) {
        this.modeId = modeId;
        this.fileName = fileName;
    }

    public static List<String> getResourceByModeId(Integer modeId) {
        ModeEnum[] modeEnums = ModeEnum.values();
        for (ModeEnum modeEnum : modeEnums) {
            if (modeEnum.getModeId().equals(modeId)) {
                return modeEnum.getFileName();
            }
        }
        return null;
    }
}
